class TPShopLoginAPI:

    @classmethod
    def get_verify_code(cls, session):
        # session.get(url="http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify")


        req_v = session.get("http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify&r=0.3034414008483113")
        return req_v

    @classmethod
    def login(cls, session, login_data):
        login_url = "http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login"
        login_header = {"Content-Type": "application/x-www-form-urlencoded"}
        resp_login = session.post(url=login_url, data=login_data,
                                  headers=login_header)
        return resp_login
